Bentley Map V8i (SELECTseries 10) Help

Importing Data in MapInfo® MIF/MID Files

Importing data is handled by the script command MIF_LOAD. It reads the MapInfo® MIF/MID files, handling the graphics almost as if the data was found in a reference file. A script is called for each graphic object read. Normally, this script uses a PLACE ELEMENT command to add the graphics to the active design file. For each graphic object read from the MapInfo® MIF file, the corresponding data file from the MapInfo® MID file is read. For each data value in the MID line, the script defines a variable with the same name as the column, defined in the MIF header. In the above example, get a variable named state, one named statename, etc. By using the ATTACH command, these variables can be used to link the MicroStation element to a record in the SQL database. It is possible to leave out the linking of the graphics to a database record and only create “plane” graphics.

The following example shows the simplest way to import data from MapInfo® to MicroStation without a database.



The elements created in MicroStation will be as similar as possible to the corresponding MapInfo® graphics. In the example, the graphics are placed on level 40. A level must be specified, because MapInfo® does not use level numbers. Besides the level, it is possible to modify or define the layout of the MicroStation elements created by assigning values to the script built-in variables like co, wt, tx, etc., before using the PLACE command.

Not all information about the graphics is defined the same way. Scripts use a number of specialized variables to secure the desired data conversion.